
QT += core gui
QT += qml quick     #QML和Quick
QT += sql           #数据库
QT += network       #网络
QT += multimedia    #多媒体
QT += sensors
QT += texttospeech  #文字转语音
QT += quickcontrols2    #使用风格
#QT += webkitwidgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

#QT += websockets \
#    xml svg \
#    bluetooth nfc \
#    positioning location \
#    3dcore 3dinput 3dquick 3drender



#C++11支持lamda表达式
QMAKE_CXXFLAGS += -std=c++0x    #支持lambda表达式
CONFIG += c++11                 #支持lambda表达式
#CONFIG += console               #将输出到控制台
#CONFIG += warn_off release
#CONFIG -= app_bundle
#CONFIG -= qt                   #是否使用qt库

CONFIG += mobility
MOBILITY += sensors



CONFIG(debug, debug|release) {  #debug版本
#LIBS += -L../lib1 -lhellod
#LIBS += -L$$PWD/ -lxxx
#LIBS += -Lxxx -lyyy        #xxx是路径,yyy是lib/so名

#LIBS += -lwsock32


#RESOURCES += \
#    Res.qrc \
#    QML.qrc
}
else {          #release版本
#LIBS += -L../lib2 -lhello

#RESOURCES += \
#    Res.qrc \
#    QML.qrc

# 鹰：这是预编译宏定义
#DEFINES += _WIN32_WINNT=0x600
DEFINES += _WIN32_WINNT=_WIN32_WINNT_WIN7

DEFINES += QT_MESSAGELOGCONTEXT #使Release版本输出的日志包含文件名、函数名和行数
# !!!鹰：注意，下面3个屏蔽qDebug、qWarning、qInfo时，同时也不会执行 !!!这行中的所有函数!!!
#DEFINES+=QT_NO_DEBUG_OUTPUT    #屏蔽release版本中所有qDebug()提示信息
#DEFINES+=QT_NO_INFO_OUTPUT
#DEFINES+=QT_NO_WARNING_OUTPUT

#-W[no-]<警告选项>。例如代码：
QMAKE_CXXFLAGS += -Wno-unused-parameter #没有用到的参数变量
QMAKE_CXXFLAGS += -Wno-unused-variable  #没有用到的变量
QMAKE_CXXFLAGS += -Wunused-but-set-variable #没有用到的变量
QMAKE_CXXFLAGS += -Wno-sign-compare #忽略有符号比较?
#QMAKE_CXXFLAGS += -fpermissive

##前两行意思为在release版本中增加debug信息；第三行意思为release版本中去掉-s参数，这样就生成对应符号表，可以调试跟踪；
#QMAKE_CXXFLAGS_RELEASE += -g
#QMAKE_CFLAGS_RELEASE += -g
#QMAKE_LFLAGS_RELEASE = -mthreads #-Wl

##貌似Profile版本自带debug信息，但用的库都是release的
}

android {
    #QAndroidJniObject、QtAndroid 属于 androidextras 模块
    QT += androidextras

    #指定 安卓包路径(包含资源、assets、src、AndroidManifest.xml)
    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

    #如果是 armeabi-v7a
    contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
        #ANDROID_EXTRA_LIBS不能写在这里，否则不会复制到apk
    }

    #不知为何，加上ANDROID_EXTRA_LIBS程序会闪退
    #ANDROID_EXTRA_LIBS = \
        #$$PWD/android/libs/libtestSharedLib.so
        #$$PWD/android/libs/armeabi-v7a/libEnglishKill_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5WebView_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DQuickExtras_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DQuickAnimation_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DExtras_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DAnimation_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DQuickRender_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DQuickScene2D_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DQuickInput_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DRender_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DInput_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DQuick_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Location_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DLogic_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt53DCore_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5PositioningQuick_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Positioning_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5ScriptTools_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5DataVisualization_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Script_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Charts_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QuickControls2_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QuickTemplates2_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5TextToSpeech_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5WebChannel_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5RemoteObjects_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5XmlPatterns_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Bodymovin_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Scxml_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Help_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Bluetooth_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Nfc_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Purchasing_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5WebSockets_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Gamepad_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5MultimediaQuick_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5MultimediaWidgets_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Multimedia_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Sensors_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QuickWidgets_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QuickParticles_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QuickTest_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QuickShapes_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Quick_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QmlWorkerScript_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5QmlModels_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Qml_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5SerialPort_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5NetworkAuth_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Svg_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5AndroidExtras_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5OpenGL_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5PrintSupport_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Test_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Widgets_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Gui_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Concurrent_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Network_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Sql_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Xml_armeabi-v7a.so $$PWD/../../../Programs/Programming/Qt/Qt/Qt5.14.2/5.14.2/android/lib/libQt5Core_armeabi-v7a.so
    #ANDROID_EXTRA_LIBS +=
    #LIBS += -L$$PWD/android/libs/armeabi-v7a -lxxx

    message("android: $$ANDROID_TARGET_ARCH")
    #message("ANDROID_EXTRA_LIBS: $$ANDROID_EXTRA_LIBS")
}
win32 {
    LIBS += -ldbghelp       #程序奔溃后产生dump文件
    message("Windows 32 bit [win32]")
}
ios {
#    ICON_DATA.files = \
#        $$PWD/ios/Icon.png \
#        $$PWD/ios/Icon@2x.png \
#        $$PWD/ios/Icon-60.png \
#        $$PWD/ios/Icon-60@2x.png \
#        $$PWD/ios/Icon-72.png \
#        $$PWD/ios/Icon-72@2x.png \
#        $$PWD/ios/Icon-76.png \
#        $$PWD/ios/Icon-76@2x.png \
#        $$PWD/ios/Def.png \
#        $$PWD/ios/Def@2x.png \
#        $$PWD/ios/Def-Portrait.png \
#        $$PWD/ios/Def-568h@2x.png
#    QMAKE_BUNDLE_DATA += ICON_DATA

    #包含这句后，Qt不会自动生成Info.plist文件了!!!
    QMAKE_INFO_PLIST = $$PWD/ios/Info.plist
    OTHER_FILES += $$QMAKE_INFO_PLIST
    message("ios")
}
linux-g++*{
    #INCLUDEPATH += /usr/lib/x86_64-linux-gnu

    #CONFIG(debug, debug|release): {
    #    DEFINES += DEBUG
    #}
    message("Linux Generic [linux-g++]")
}
else {
}




TEMPLATE = app      #应用

#TEMPLATE = lib     #库
#CONFIG += staticlib    #静态库(不加则是动态库,动态库还需要global文件,内容如下)

#鹰：编译为动态链接库（在main.cpp中）
#DEFINES += DYNAMICLIB_LIBRARY


#//include <QtCore/qglobal.h>
#if defined(DYNAMICLIB_LIBRARY)
#  define DYNAMICLIBSHARED_EXPORT Q_DECL_EXPORT
#else
#  define DYNAMICLIBSHARED_EXPORT Q_DECL_IMPORT
#endif

#还要加下面的???
#unix {
#    target.path = /usr/lib
#    INSTALLS += target
#}



#lupdate_only {
#SOURCES += \
#    qml/*.qml
#}



TARGET = Pets

# 生成可执行文件的路径
#DESTDIR = /home/xxx/test
#MOC_DIR = obj/Moc
#RCC_DIR = obj/rcc
#UI_DIR  = obj/Gui
#OBJECTS_DIR = obj/Obj
#win32:RC_FILE       = main.rc
#PRECOMPILED_HEADER  = myhelper.h


#TRANSLATIONS = resources/translations/leamus_ru.ts



RC_ICONS = icon.ico



SOURCES += _SRC/main.cpp \
    _SRC/GameManager.cpp \
    _SRC/GamePlatform.cpp \
    _SRC/Game.cpp \
    _SRC/UserInfo.cpp \
    \
    _SRC/Game/SocketDefine.cpp \
    _SRC/Game/GameDefine.cpp \
    _SRC/Game/Player.cpp \
    \
    _SRC/_Global/GameModel.cpp \
    _SRC/_Global/GameModelThread.cpp \
    _SRC/_Global/GameCommon.cpp \
    _SRC/_Global/GlobalClass.cpp \
    _SRC/_Global/Platform/Platform.cpp \
    _SRC/_Global/Sqlite/Sqlite.cpp \
    _SRC/_Global/Socket/Common.cpp \
    _SRC/_Global/Socket/ClientSocket.cpp \
    _SRC/_Global/HTTP/NetworkAccessManager.cpp \
    _SRC/_Global/HTTP/HTTPDownload.cpp \
    _SRC/_Global/VersionCheck/VersionCheck.cpp

HEADERS += \
    _SRC/GameManager.h \
    _SRC/GamePlatform.h \
    _SRC/UserInfo.h \
    _SRC/Game.h \
    \
    _SRC/Game/SocketDefine.h \
    _SRC/Game/GameDefine.h \
    _SRC/Game/Player.h \
    \
    _SRC/_Global/GameModel.h \
    _SRC/_Global/GameModelThread.h \
    _SRC/_Global/GameCommon.h \
    _SRC/_Global/GlobalClass.h \
    _SRC/_Global/Platform/Platform.h \
    _SRC/_Global/Sqlite/Sqlite.h \
    _SRC/_Global/Socket/Common.h \
    _SRC/_Global/Socket/ClientSocket.h \
    _SRC/_Global/HTTP/NetworkAccessManager.h \
    _SRC/_Global/HTTP/HTTPDownload.h \
    _SRC/_Global/VersionCheck/VersionCheck.h

RESOURCES += \
    #res.qrc

FORMS += \
    #_SRC/Dialog.ui

DISTFILES += \
    _SRC/QML/main.qml \
    _SRC/QML/Global.qml \
    _SRC/QML/Logo.qml \
    \
    _SRC/QML/Game/Pet.qml \
    _SRC/QML/Game/GameUI.qml \
    _SRC/QML/Game/NormalUI.qml \
    _SRC/QML/Game/FightUI.qml \
    _SRC/QML/Game/game.qml \
    _SRC/QML/Game/DebugWindow.qml \
    _SRC/QML/Game/GameJS.js \
    \
    _SRC/QML/Game/Client/Login.qml \
    _SRC/QML/Game/Client/Register.qml \
    _SRC/QML/Game/Client/RegisterGameUser.qml \
    \
    _SRC/QML/Game/Group/Group.qml \
    _SRC/QML/Game/Group/InGroup.qml \
    \
    _SRC/QML/LGlobal/GameData.qml \
    _SRC/QML/LGlobal/GameFunctions.qml \
    _SRC/QML/LGlobal/GameSignals.qml \
    _SRC/QML/LGlobal/GamePos.qml \
    _SRC/QML/LGlobal/GameSettings.qml \
    _SRC/QML/LGlobal/GameResource.qml \
    _SRC/QML/LGlobal/GameConfig.qml \
    \
    _SRC/QML/_Global/qmldir \
    _SRC/QML/_Global/qtquickcontrols2.conf \
    _SRC/QML/_Global/Global.js \
    _SRC/QML/_Global/GameItem.qml \
    _SRC/QML/_Global/Create.qml \
    _SRC/QML/_Global/QObject.qml \
    _SRC/QML/_Global/GameItem0.qml \
    _SRC/QML/_Global/L_Radio.qml \
    _SRC/QML/_Global/WordMove.qml \
    _SRC/QML/_Global/MsgBox.qml \
    _SRC/QML/_Global/Button/ImageButton.qml \
    _SRC/QML/_Global/Button/ImageButton2.qml \
    _SRC/QML/_Global/Button/ColorButton.qml \
    _SRC/QML/_Global/Line/Line.qml \
    _SRC/QML/_Global/Popup/Mask.qml \
    _SRC/QML/_Global/Popup/Popup.qml \
    _SRC/QML/_Global/Progress/Progress.qml \
    _SRC/QML/_Global/Particles/Particles1.qml \
    \
    \
    android/AndroidManifest.xml \
    android/build.gradle \
    android/gradlew \
    android/gradlew.bat \
    android/gradle/wrapper/gradle-wrapper.jar \
    android/gradle/wrapper/gradle-wrapper.properties \
    \
    android/res/values/libs.xml \
    android/res/values/styles.xml \
    \
    android/src/cn/Leamus/MainActivity.java \
    android/src/cn/Leamus/Module.java

OTHER_FILES += \
    _SRC/QML/qmldir \
    _SRC/QML.qrc \
    _SRC/Res.qrc \
    _SRC/_Global/Socket/1.Pleafles.txt \
    \
    _ExtraFiles/Config.cfg \
    _ExtraFiles/1.Pleafles.txt


#INCLUDEPATH += . http/client http utils base
#INCLUDE_PATH = /usr
#INCLUDEPATH += \
#    $$INCLUDE_PATH/include



# Additional import path used to resolve QML modules in Qt Creator's code model
# 用于在Qt Creator的代码模型中解析QML模块的附加导入路径
QML_IMPORT_PATH = $$PWD/_SRC/QML
QML2_IMPORT_PATH = qrc:/QML
#message($$QML_IMPORT_PATH)
#message($${QML2_IMPORT_PATH})

# Additional import path used to resolve QML modules just for Qt Quick Designer
# 用于解析Qt Quick Designer的QML模块的附加导入路径
QML_DESIGNER_IMPORT_PATH =

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
# 使用Qt的不推荐的特性会发出警告
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
# 禁用某个版本之前不推荐的Api（Qt6）
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target


include(_SRC/inc.pri)
